<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    @selection-change="handleSelectionChange"
  >
    <el-table-column
      type="selection"
      width="55"
    >
    </el-table-column>
    <el-table-column
      prop="title"
      label="短剧名称"
    >
    </el-table-column>
    <el-table-column
      prop="cover"
      label="封面"
    >
      <template slot-scope="{ row }">
        <el-image
          :src="row.cover"
          class="image"
        ></el-image>
      </template>
    </el-table-column>
    <el-table-column
      prop="upload_num"
      label="集数"
    >
    </el-table-column>
    <el-table-column
      label="状态"
      prop="status"
    >
      <template slot-scope="scope">
        <span
          v-if="scope.row.status==1"
          class="noSend"
        >更新中</span>
        <span
          v-if="scope.row.status==2"
          class="sended"
        >已完结</span>
        <!-- <span v-else-if="scope.row.status==1" class="sended">{{ scope.row.status_text }}</span>
        <span v-else-if="scope.row.status==2" class="sendFail">{{ scope.row.status_text }}</span>
        <span v-else-if="scope.row.status==3" class="sendStop">{{ scope.row.status_text }}</span>
        <span v-else-if="scope.row.status==4" class="sendStop">{{ scope.row.status_text }}</span> -->
      </template>
    </el-table-column>
    <el-table-column
      prop="status_ji"
      label="上架状态"
    >
      <template slot-scope="{ row }">
        <p>已上架</p>
      </template>
    </el-table-column>
    <el-table-column
      prop="center"
      label="展示位置"
    >
      <template slot-scope="{ row }">
        <p>已上架</p>
      </template>
    </el-table-column>
    <el-table-column
      prop="ji"
      label="开始付费剧集"
    >
      <template slot-scope="{ row }">
        <p>已上架</p>
      </template>
    </el-table-column>
    <el-table-column
      prop="money"
      label="定价(虚拟币/集)"
    >
      <template slot-scope="{ row }">
        {{ formatNumber(row.pay_coin) }}
      </template>
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="{row}">
        <el-button
          type="text"
          size="medium"
        >下线</el-button>
        <el-button
          type="text"
          size="medium"
        >付费设置</el-button>
        <el-button
          type="text"
          size="medium"
        >生成推广链接</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>
<script>
import { formatNumber } from '@/utils/index'
export default {
  props: ['tableData'],
  data() {
    return {
      formatNumber: formatNumber
    }
  },
  methods: {
    handleSelectionChange() {}
  }
}
</script>

<style lang="scss" scoped>
.image {
  width: 50px;
  border-radius: 5px;
}
</style>